package net.qhzw.geologr5.gis.service.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import net.qhzw.geologr5.gis.service.system.entity.ProjectData;
import net.qhzw.geologr5.gis.service.system.pojo.ProjectDataCartVo;
import net.qhzw.geologr5.gis.service.system.query.GisCartQuery;
import net.qhzw.geologr5.gis.service.system.query.ProjectDataQuery;
import net.qhzw.geologr5.gis.service.system.vo.project.ProjectDataVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/***
 * 项目资料dao
 */
public interface ProjectDataMapper extends BaseMapper<ProjectData> {


    /***
     * 项目资料查询
     * @param prijectId
     * @return
     */
    List<ProjectData> selectByPrijectId(Integer prijectId);


    /***
     * 项目资料查询
     * @param query
     * @return
     */
    List<ProjectDataVo> projectInfo(ProjectDataQuery query);


    /****
     * 批量修改数据权限
     * @param idlist
     * @param authorityId
     * @return
     */
    int btchEditAuthority(@Param("idlist") List<Integer> idlist,
                          @Param("authorityId") Integer authorityId,
                          @Param("identity") Integer identity);


    /***
     * 批量新增
     * @param projectDataList
     */
    void btchInsert(@Param("projectDataList") List<ProjectData> projectDataList);


    /***
     * id集合查询
     * @param projectDataIds
     * @return
     */
    List<ProjectData> selectByIdList(@Param("projectDataIds") List<Integer> projectDataIds);


    /***
     * 根据id集合查询
     * @param dataIds
     * @return
     */
    List<ProjectDataVo> projectInfoByIdList(@Param("dataIds") List<Integer> dataIds);


    /***
     * 根据userId 查询项目资料
     * @param query
     * @return
     */
    List<ProjectDataCartVo> selectByUserId(GisCartQuery query);

    /***
     * 根据项目id查询total
     * @param projectId
     * @return
     */
    Integer selectByTotal(Integer projectId);
}
